package com.gec.service.impl;

import com.gec.dao.DeptDao;
import com.gec.dao.impl.DeptDaoImpl;
import com.gec.domain.Dept;
import com.gec.domain.Job;
import com.gec.service.DeptService;
import com.gec.utils.PageModel;

import java.util.List;

public class DeptServiceImpl implements DeptService {
    DeptDao dao=new DeptDaoImpl();
    @Override
    public void addDept(Dept dept) {
        dao.addDept(dept);
    }

    @Override
    public List<Dept> findAllDept(Dept dept, PageModel model) {
        return dao.findAllDept(dept,model);
    }

    @Override
    public void deleteDept(int id) {
        dao.deleteDept(id);
    }

    @Override
    public void updateDept(Dept dept) {
        dao.updateDept(dept);
    }

    @Override
    public int getTotalDeptCount(Dept dept) {
        return dao.getTotalJobCount(dept);
    }

    @Override
    public Dept findDeptById(int id) {
        return dao.findDeptById(id);
    }

    @Override
    public List<Dept> findDept(Dept dept) {
        return dao.findDept(dept);
    }


}
